<?php
/**
 * Created by PhpStorm.
 * User: yangsen
 * Date: 15/6/30
 * Time: 下午4:12
 */

class MY_Controller extends CI_Controller {
    protected $oauth;
    public function __construct() {
        parent::__construct();
        $this->load->model('Oauth_Model');
        $this->load->model('member');
        $this->load->helper('url');
        $dbconn = $this->load->database();
        $this->load->library('session');
        $this->oauth=new Oauth_Model();
    }

    public function getWechat() {
        $token = $this->config->item('wxtoken');
        $this->load->library('WeChat');
        $wechat = new WeChat($token);
        return $wechat;
    }
}